﻿using System;

namespace HRN.Bot {
    public partial class AddLinkOrProxy {
        internal AddLinkOrProxy() {
            InitializeComponent();
        }

        private void AddLinkOrProxy_Load(object sender, EventArgs e) {
            //MainMenu.DefaultInstance.GetElementFromPoint();
        }

        private void AddLinkOrProxy_Click(object sender, EventArgs e) {
            string[] lstring = textBox1.Text.Split(Environment.NewLine.ToCharArray());
            if (lstring != null && lstring.Length > 0) {
                if (lstring[0].Contains("http://"))
                    MainMenu.DefaultInstance.LoadUrl(lstring);
                else if (lstring[0].Contains(":"))
                    MainMenu.DefaultInstance.LoadProxy(lstring);
            }
            this.Close();
        }


    }
}